import 'dart:ui';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:icons_plus/icons_plus.dart';
import '../model/model_user_album.dart';

class WidgetAlbumInfo extends StatelessWidget {
  const WidgetAlbumInfo(
      {super.key, required this.album, required this.onView, required this.onDelete, required this.onReSelPath});

  final ModelUserAlbum album;

  final ValueChanged<int> onView;
  final ValueChanged<int> onDelete;
  final ValueChanged<int> onReSelPath;

  @override
  Widget build(BuildContext context) {
    final size = MediaQuery.of(context).size;
    print(size);

    return Container(
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceAround,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          SizedBox(width: 200, child: Text(album.name!)),
          // Text(album.filePath!),
          Text("${album.mediaQty}"),
          Text("${album.finishQty}"),
          Text("${album.wordQty}"),
          Text("${album.reviewQty}"),
          Text("${album.sentenceQty}"),
          Text("${album.speed}"),
          IconButton(
            onPressed: () {},
            icon: Icon(Bootstrap.book),
            tooltip: "开始学习",
          ),
          // ElevatedButton(
          //     onPressed: () {
          //       onView(album.id!);
          //     },
          //     child: Text("查看")),
          IconButton(
            onPressed: () {},
            icon: Icon(Bootstrap.folder),
            tooltip: "重新选择文件夹",
          ),
          // ElevatedButton(
          //     onPressed: () {
          //       onReSelPath(album.id!);
          //     },
          //     child: Text("重新选择文件夹")),
          // ElevatedButton(
          //     onPressed: () {
          //       onDelete(album.id!);
          //     },
          //     child: Text("删除"))
          IconButton(
            onPressed: () {},
            icon: Icon(Icons.delete),
            tooltip: "删除",
          ),
        ],
      ),
    );
  }
}
